/*
 *  Copyright (C) 2010 glauco
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.common;

import java.io.Serializable;

/**
 * Utilizado para selecionar uma entidade de uma lista de entidades.
 * Possui um EntityGrid para listar as entidades e um EntityAction para
 * adicionar ações de Confirmar e Cancelar.
 * Para o EntityGrid deve-se adicionar o EntityLoader antes de atribuir a
 * objetos desta interface.
 *
 * @author glauco
 */
public interface EntitySelection
        <G extends EntityGrid,A extends EntityActions, V>
        extends VisualEntity<V> {

    /**
     * Atribui o EntityGrid.
     *
     * @param entityGrid
     */
    public void setEntityGrid(G entityGrid);

    /**
     * Retorna o EntityGrid.
     */
    public G getEntityGrid();

    /**
     * Atribui o EntityActions.
     *
     * @param entityActions
     */
    public void setEntityActions(A entityActions);

    /**
     * Retorna o EntityActions.
     */
    public A getEntityActions();

    /**
     * Retorna a entidade selecionada no EntityGrid.
     * @return Retorna a entidade selecionada no EntityGrid.
     */
    public Serializable getSelectedEntity();
}
